﻿@using System.Security.Claims

<!DOCTYPE html>

<html lang="zh-CN">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8" />
    <title>@ViewBag.Title</title>
    <link rel="stylesheet" href="~/css/pure/pure.css">
    <link rel="stylesheet" href="~/css/normalize.css">
    <link rel="stylesheet" asp-append-version="true" href="~/css/site.css">
</head>
<body>
    <header>
        <div id="nav_container">
            <nav class="pure-menu pure-menu-horizontal">
                <a href="#" class="pure-menu-heading"><img src="~/images/logo.svg" alt="TalkLog"></a>
                <ul class="pure-menu-list">
                    <li class="pure-menu-item"><a asp-action="Index" asp-controller="Home" class="pure-menu-link">说说</a></li>
                    <li class="pure-menu-item"><a href="#" class="pure-menu-link">消息</a></li>
                    <li class="pure-menu-item"><a href="#" class="pure-menu-link">关于</a></li>
                    @if (Context.User.Identity.IsAuthenticated)
                    {
                        <li class="pure-menu-item"><a asp-action="ShowMyInfo" asp-controller="Account" class="display_name pure-menu-link account">@Context.User.Claims.First(c => c.Type == ClaimTypes.Name).Value</a></li>
                    }
                    else
                    {
                        <li class="pure-menu-item"><a asp-action="Login" asp-controller="Account" class="pure-menu-link account">请登录</a></li>
                    }

                </ul>
            </nav>
        </div>
    </header>
    <div id="main">
        @RenderBody()
    </div>
    <footer id="page_footer">
        Powered by .NET Core 2.2 on Linux
    </footer>
    @RenderSection("js", false)
</body>
</html>
